cap program drop load_dataset
program load_dataset
	args buyer
	if "`buyer'" == "Georgia"{
		use Data/georgia/sample_georgia26may22.dta, clear /* NAT==1only */
		qui gen delta_low1 = delta_first
		qui gen delta_low2 = delta23_first
		qui gen delta_win1 = deltaw_first
		qui gen delta_win2 = deltaw23_first
	}
	else if "`buyer'" == "Caltrans"{
		use Data/caltrans/sample_caltrans11Aug24.dta, clear
		*use Data/caltrans/sample_caltrans06jun22.dta, clear
		*use Data/caltrans/bht14_caltrans.dta, clear
		rename delta delta_low1
		rename delta23 delta_low2
		*drop Bwin Bwinbid
		*keep contract_id delta* lnblog*
	}
	else if "`buyer'" == "Malta"{
		local TABLE_combined = ""
		use Data/Malta/malta.dta, clear
		keep if Evaluation_Method == "Price/Cost Effectiveness" & eAuctions=="No"
		rename deltap delta_win1
		rename delta2p delta_win2
		rename delta delta_low1
		rename delta2 delta_low2
		
	}
	else if "`buyer'" == "Mongolia"{				
		use Data/mongolia/sample_mongolia_30jun22.dta, clear
		rename delta1w delta_win1
		rename delta2w delta_win2
		rename delta1 delta_low1
		rename delta2 delta_low2
	}
	else if "`buyer'" == "Indonesia"{
		use Data/indonesia/xyz.dta, replace /* NAT==1only */
		set seed 1002928
		/* auctions in which the lowest bidder wins*/
		cap drop temp

		drop if z_konsultan == 1 

		rename delta2 delta_win1 
		rename delta2_p delta_win2  
		rename delta delta_low1 
		rename delta_p delta_low2  
		qui gen Eprocurement = (z_proc_type == "SEP")
		qui bys z_state_name: egen Ep_state = max(Eprocurement)
		qui gen non_EP = (Ep_state == 1 & Eprocurement == 0)
		keep delta_low1 delta_low2 lnblog* contract_id
	}
end
